-- GENERATED SPELL FOR [High Thane Jorfus] --


function spell0_32501(pUnit, Event) --@Blood Plague,n/a--
pUnit:FullCastSpellOnTarget(60950,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32501', 12000, 1)
end

function spell1_32501(pUnit, Event) --@Blood Strike,n/a--
pUnit:FullCastSpellOnTarget(60945,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32501', 606, 1)
end

function spell2_32501(pUnit, Event) --@Death and Decay,n/a--
pUnit:FullCastSpellOnTarget(60953,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32501', 10000, 1)
end

function spell3_32501(pUnit, Event) --@Death Coil,n/a--
pUnit:FullCastSpellOnTarget(60949,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32501', 0, 1)
end

function spell4_32501(pUnit, Event) --@Frost Strike,n/a--
pUnit:FullCastSpellOnTarget(60951,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32501', 638, 1)
end

function Sorts_32501(pUnit, Event)
local choix_sorts_32501 = math.random(0, 4)
if choix_sorts_32501 == 0 then
pUnit:RegisterEvent('spell0_32501', 1, 1)
end
if choix_sorts_32501 == 1 then
pUnit:RegisterEvent('spell1_32501', 1, 1)
end
if choix_sorts_32501 == 2 then
pUnit:RegisterEvent('spell2_32501', 1, 1)
end
if choix_sorts_32501 == 3 then
pUnit:RegisterEvent('spell3_32501', 1, 1)
end
if choix_sorts_32501 == 4 then
pUnit:RegisterEvent('spell4_32501', 1, 1)
end
end

function mob32501_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32501', math.random(1500, 3000), 1)
end

function mob32501_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32501_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32501_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32501, 1, 'mob32501_Action')
RegisterUnitEvent(32501, 2, 'mob32501_Leave')
RegisterUnitEvent(32501, 3, 'mob32501_Kill')
RegisterUnitEvent(32501, 4, 'mob32501_Die')
